package com.cyzy.entity;

import java.util.Date;

public class TeacherAvailableTime {
    private Integer id;
    private Integer teacherId;
    private String teacherName;
    private Integer classId;
    private Integer weekday; // 1-6代表周一到周六
    private Integer timePeriod; // 1上午，2下午
    private String courseName;
    private Date createTime;
    private Date updateTime;

    // 构造函数
    public TeacherAvailableTime() {}

    public TeacherAvailableTime(Integer id, Integer teacherId, String teacherName, Integer classId,
                                Integer weekday, Integer timePeriod, String courseName,
                                Date createTime, Date updateTime) {
        this.id = id;
        this.teacherId = teacherId;
        this.teacherName = teacherName;
        this.classId = classId;
        this.weekday = weekday;
        this.timePeriod = timePeriod;
        this.courseName = courseName;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    // Getter 和 Setter 方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(Integer teacherId) {
        this.teacherId = teacherId;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Integer getWeekday() {
        return weekday;
    }

    public void setWeekday(Integer weekday) {
        this.weekday = weekday;
    }

    public Integer getTimePeriod() {
        return timePeriod;
    }

    public void setTimePeriod(Integer timePeriod) {
        this.timePeriod = timePeriod;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    // 获取星期几的中文名称
    public String getWeekdayStr() {
        switch (weekday) {
            case 1: return "周一";
            case 2: return "周二";
            case 3: return "周三";
            case 4: return "周四";
            case 5: return "周五";
            case 6: return "周六";
            default: return "未知";
        }
    }

    // 获取时间段的中文名称
    public String getTimePeriodStr() {
        return timePeriod == 1 ? "上午" : "下午";
    }
}
